import 'package:flutter/widgets.dart';

const _radius = Radius.circular(10);

class TileTopRounder extends StatelessWidget {
  const TileTopRounder({
    required this.tile,
    super.key,
  });

  final Widget tile;

  @override
  Widget build(BuildContext context) {
    const borderRadius = BorderRadius.vertical(
      top: _radius,
    );

    return ClipRRect(
      borderRadius: borderRadius,
      child: tile,
    );
  }
}

class TileBottomRounder extends StatelessWidget {
  const TileBottomRounder({
    required this.tile,
    super.key,
  });

  final Widget tile;

  @override
  Widget build(BuildContext context) {
    const borderRadius = BorderRadius.vertical(
      bottom: _radius,
    );

    return ClipRRect(
      borderRadius: borderRadius,
      child: tile,
    );
  }
}
